package hu.rsc.forbiddenwords.shared;

import java.util.Iterator;

import com.google.gwt.user.client.rpc.IsSerializable;

public class ImmutableIterator<E> implements Iterator<E>, IsSerializable {
    private Iterator<E> iterator;

    public ImmutableIterator(Iterator<E> iterator) {
	this.iterator = iterator;
    }

    @Override
    public boolean hasNext() {
	return this.iterator.hasNext();
    }

    @Override
    public E next() {
	return this.iterator.next();
    }

    @Override
    public void remove() {
	throw (new UnsupportedOperationException());
    }

}